package thread;

import java.util.concurrent.*;

public class testDemo26 {
    public static void main(String[] args) {
        ExecutorService service= Executors.newFixedThreadPool(3);
        service.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("工厂类创建的线程池对象");
            }
        });
        ScheduledExecutorService service1=Executors.newScheduledThreadPool(1);
        service1.schedule(()->{
            System.out.println("111");
        },3,TimeUnit.SECONDS);
        service1.shutdown();
    }
}
